home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-04-19 | 4.6 KB | 211 lines | [TEXT/MPS ] |
- //# Copyright: © 1993-94 by Apple Computer, Inc., all rights reserved.
- #ifndef _DRAFT_
- #define _DRAFT_
-
- #ifndef _REFCTOBJ_
- #include "RefCtObj.idl"
- #endif
-
- #ifndef _STORAGEU_
- #include "StorageU.idl"
- #endif
-
- //==============================================================================
- // Constants
- //==============================================================================
-
- enum ODDraftPermissionsConsts {
- kDPNone,
- kDPTransient,
- kDPReadOnly,
- kDPSharedWrite,
- kDPExclusiveWrite
- };
- typedef ODULong ODDraftPermissions;
-
- enum ODPurgePriorityConsts {
- kInvisibleBlocks,
- kAllBlocks,
- kVisibleBlocks
- };
- typedef ODULong ODPurgePriority;
-
- enum ODCloneKindConsts {
- kODCloneCopy,
- kODCloneCut,
- kODClonePaste,
- kODCloneDuplicate,
- kODCloneDropCopy,
- kODCloneDropMove,
- kODCloneAll
- };
- typedef ODULong ODCloneKind;
-
- //==============================================================================
- // Scalar Types
- //==============================================================================
- typedef ODULong ODVersionID;
- typedef ODID ODDraftID;
- typedef ODID ODLinkID;
- typedef ODISOStr ODDraftName;
-
- //==============================================================================
- // Classes defined in this interface
- //==============================================================================
- interface ODDraft;
-
- //==============================================================================
- // Classes used by this interface
- //==============================================================================
- interface ODDocument;
- interface ODFrame;
- interface ODLink;
- interface ODLinkSource;
- interface ODLinkSpec;
- interface ODPart;
- interface ODShape;
- // interface ODStorageUnit;
-
- //==============================================================================
- // ODDraft
- //==============================================================================
-
- interface ODDraft : ODRefCntObject
- {
-
- ODDocument GetDocument();
-
- ODDraftID GetID();
-
- ODDraftName GetName();
-
- void SetName(in ODDraftName name);
-
- ODStorageUnit GetDraftProperties();
-
- ODDraftPermissions GetPermissions();
-
- ODStorageUnit CreateStorageUnit();
-
- ODStorageUnit GetStorageUnit(in ODStorageUnitID id);
-
- void RemoveStorageUnit(in ODStorageUnit storageUnit);
-
- ODDraftKey BeginClone(in ODCloneKind kind);
-
- void EndClone(in ODDraftKey key);
-
- void AbortClone(in ODDraftKey key);
-
- ODBoolean ChangedFromPrev();
-
- void SetChangedFromPrev();
-
- void RemoveFromDocument();
-
- ODDraft RemoveChanges();
-
- ODDraft Externalize();
-
- ODDraft SaveToAPrevious(in ODDraft to);
-
- ODFrame CreateFrame(
- in ODFrame containingFrame,
- in ODShape frameShape,
- in ODPart part,
- in ODTypeToken viewType,
- in ODTypeToken presentation,
- in ODULong frameGroup,
- in ODBoolean isRoot,
- in ODBoolean isOverlaid);
-
- ODFrame GetFrame(in ODStorageUnitID id);
-
- void RemoveFrame(in ODFrame frame);
-
- ODPart CreatePart(in ODType partType,
- in ODEditor optionalEditor);
-
- ODPart GetPart(in ODStorageUnitID id);
-
- void RemovePart(in ODPart part);
-
- ODLinkSpec CreateLinkSpec (in ODPart part,
- in ODPtr data,
- in ODULong size);
-
- ODLinkSource CreateLinkSource(in ODPart part);
-
- ODLinkSource GetLinkSource(in ODStorageUnitID id);
-
- ODLink GetLink(in ODStorageUnitID id,
- in ODLinkSpec linkSpec);
-
- void RemoveLink(in ODLink link);
-
- void RemoveLinkSource(in ODLinkSource link);
-
- // private by convention
-
- void InitDraft(in ODDocument document,
- in ODDraftID id,
- in ODDraftPermissions perms);
-
- void ReleaseFrame(in ODFrame frame);
-
- void ReleasePart(in ODPart part);
-
- void ReleaseLink(in ODLink link);
-
- ODDraft ReleaseStorageUnit(in ODStorageUnitID id);
-
- #ifdef __SOMIDL__
- implementation
- {
- override:
- somInit,
- somUninit,
- IncrementRefCount,
- Release;
- releaseorder:
- GetDocument,
- GetID,
- GetName,
- SetName,
- GetDraftProperties,
- GetPermissions,
- CreateStorageUnit,
- GetStorageUnit,
- RemoveStorageUnit,
- BeginClone,
- EndClone,
- AbortClone,
- ChangedFromPrev,
- SetChangedFromPrev,
- RemoveFromDocument,
- RemoveChanges,
- Externalize,
- SaveToAPrevious,
- CreateFrame,
- GetFrame,
- RemoveFrame,
- CreatePart,
- GetPart,
- RemovePart,
- CreateLinkSpec,
- CreateLinkSource,
- GetLinkSource,
- GetLink,
- RemoveLink,
- RemoveLinkSource,
- InitDraft,
- ReleaseFrame,
- ReleasePart,
- ReleaseLink,
- ReleaseStorageUnit;
- };
- #endif
- };
-
- #endif // _DRAFT_
-